/**
 * 存放静态路由
 */
export const LAYOUT = () => import('@/layouts/default/index.vue');
export const SubLayout = () => import('@/layouts/default/subLayout.vue');

/**
 * Layout 内容区域默认显示主页路由
 */
export const HOME_ROUTE = {
  path: '/',
  redirect: '/home',
  component: LAYOUT,
  meta: {
    title: 'root'
  },
  children: [
    {
      path: '/home',
      name: 'Home',
      component: () => import('@/views/system/home/index.vue'),
      meta: {
        title: '主页',
        icon: 'el-icon-s-home'
      }
    }
  ]
};

export const LOGIN_ROUTE = {
  path: '/login',
  name: 'Login',
  component: () => import('@/views/system/login/index.vue'),
  meta: {
    title: '登录'
  }
};

export const PAGE_ERROR_ROUTE = {
  path: '/error',
  redirect: '/404',
  component: LAYOUT,
  meta: {
    title: 'root'
  },
  children: [
    {
      path: '/404',
      name: 'NotFound',
      component: () => import('@/views/system/error/404.vue'),
      meta: {
        title: '404'
      }
    }
  ]
};

export default [HOME_ROUTE, LOGIN_ROUTE, PAGE_ERROR_ROUTE];
